//
//  SKYCrashModel.h
//  SkyonSDK
//
//  Created by 张二帅 on 2018/5/16.
//  Copyright © 2018年 Skyon. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface SKYCrashMemoryModel : NSObject
/** 空闲内存 */
@property (nonatomic) NSUInteger free;
/** 总内存大小 */
@property (nonatomic) NSUInteger size;
/** 已用内存 */
@property (nonatomic) NSUInteger usable;
@end


@interface SKYCrashSystemModel : NSObject
/** 崩溃时内存情况 */
@property (nonatomic, strong) SKYCrashMemoryModel *memory;
/** 时区 */
@property (nonatomic, copy) NSString *time_zone;
@end


@interface SKYCrashReportModel : NSObject
/** 进程名称 */
@property (nonatomic, copy) NSString *process_name;
/** 崩溃时间 */
@property (nonatomic, strong) NSDate *timestamp;
@end


@interface SKYCrashDetailModel : NSObject
/** 崩溃详细诊断结论 */
@property (nonatomic, copy) NSString *diagnosis;
/** 错误信息 */
@property (nonatomic, strong) NSDictionary *error;

@end


@interface SKYCrashUserModel : NSObject
/** 崩溃页面 */
@property (nonatomic, copy) NSString *currentPage;
/** 当前崩溃页面开始加载的时间 */
@property (nonatomic, copy) NSString *currentPageStartTime;
/** 崩溃时CPU频率 */
@property (nonatomic, copy) NSString *cpuFrequency;
/** 电池电量 */
@property (nonatomic, copy) NSString *batteryLevel;
/** 是否是充电状态 */
@property (nonatomic, copy) NSString *batteryIsCharging;
/** 后台进程情况，iOS8以下可获取到 */
@property (nonatomic, copy) NSString *backProcess;
@end


@interface SKYCrashModel : NSObject
/** 系统信息 */
@property (nonatomic, strong) SKYCrashSystemModel *system;
/** 崩溃报告信息 */
@property (nonatomic, strong) SKYCrashReportModel *report;
/** 崩溃明细 */
@property (nonatomic, strong) SKYCrashDetailModel *crash;
/** 自定义采集崩溃信息 */
@property (nonatomic, strong) SKYCrashUserModel *user;
@end
